<template>
  <mt-tabbar :value="tab" @input="handleInput" fixed v-show="showTab">
    <mt-tab-item id="s" >
      <img slot="icon" src="../assets/searchblack.png">
      搜索
    </mt-tab-item>
    <mt-tab-item id="b" >
      <img slot="icon" src="../assets/icon1.png">
      书籍
    </mt-tab-item>
    <mt-tab-item id="r" >
      <img slot="icon" src="../assets/novels.png">
      阅读
    </mt-tab-item>
  </mt-tabbar>
</template>

<script>
  import { mapGetters } from 'vuex';
  export default {
    name: "TabBar",
    props:{
      showTab:{
        type: Boolean,
        default: true,
        required: false
      },
      isLink:{
        type: Boolean,
        default: false,
        required: false
      }
    },
    data(){
      return {
        selected:''
      }
    },
    methods:{
      handleInput(val){
        this.$emit('change',val)
      }
    },
    computed: {
      ...mapGetters([
        'tab'
      ])
    }
  }
</script>

<style scoped>

</style>
